home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics Plus
/
Graphics Plus.iso
/
msdos
/
raytrace
/
pov
/
gen
/
form04a
/
docs
/
language.doc
< prev
next >
Wrap
Text File
|
1994-02-03
|
7KB
|
283 lines
LANGUAGE.DOC
This is a brief description of the interface and language
of form. This file is updated very sporadically so I'm sorry about
the lack of organisation to it. For command line flags see form.doc
or defaults.doc
Pressing <ESC> during a display should stop the display
KEYWORDS/PHRASES
#include "filename"
copyright
CopyrIgHt
COpyRIghT...and so on
lexdebug on
lex debug off
yaccdebug on
yaccdebug off
plg scale
screen_scale
screen_res
display wire
display gouraud
display flat
display phong
sphere
cone
ellipse
spacer
box
torus
stack
stack in
grow
bend
twist
twistx
twistz
centered_grow
powered_grow
powered_centered_grow
delete
delete to
web
fan
move
with
usage:
form [options] [file] [options]
if [file] is ommited the form is read from stdin
options are also read from the environment variable FORM, and sstools.ini
******* **** ***** ** **
* * * * * * * * *
**** * * ***** * * *
* * * * * * *
* * * * * * *
* **** * * * *
C style comments are allowed both /**/ and // forms
SYMBOL is a standard C symbol ie. a-z followed by any of a-z 0-9 and _.
NUMBERS are all real, converted to int wherever appropriate.
NUMBERS can be expressions using +, -, *, /, ^, ().
VECTORS are in the form "<" real "," real "," real ">"
ANGLES are in degrees
The form file essentially describes a scene.
it has the shape of :-
any number of: objectdefinitions
any number of: debug flag assignments
any number of: configurable item assignments
any number of: output commands (currently only display!)
at least ONE: object (usually only one)
optionally terminated with the word "end" (meaning produce some output)
simple end of file simply stops processing
OBJECT
======
an object is a set of part objects terminated by a ';'
a (part) object is :
an object followed by a FORM
an object followed by a simple modifier
an object followed by a FORM modifier
a PRIMITIVE
a DEFINED_OBJECT
a DEFINED_OBJECT enclosed by "[ ]", this has the effect of rotating
the object by 90 degrees
an object "," object.
OBJECT DEFINITION
=================
is a name (symbol) followed by "=" and then an object.
COMMANDS
========
DEBUG RELATED COMMANDS
----------------------
these have no effect on the objects or output
lexdebug <on|off> turns debug prinouts from lex on or off (default off)
yaccdebug <on|off> turns debug prinouts from yacc on or off (default off)
yydebug <on|off> turns internal yacc debug prints on or off (default off)
OUTPUT RELATED COMMANDS
-----------------------
these affect the output not the shape
plg scale = number;
defines the plg scale used for output to plg - default 500
old_pov_method;
not used anymore
screen_res = [1|2|3];
equivalent to -res[1|2|3] command line option
screen_scale = number;
scale up the screen output, 1.2 is usually OK
display [object] [save file name] [rendering style];
will display object (default current object) in the
rendering style specified. save file name is not
actually implemented, it takes time but doesn't do
anything. This does not in any way represent the
views of the author to freeware, it's just I haven't
done it yet!
PRIMITIVES
==========
sphere
sphere radius
ellipse
ellipse width , height
ellipse <vector> (vector gives x, y, z axis lengths)
box
box size
box vector (vector gives x , y , z size)
torus
torus minradius , maxradius
spacer
spacer size (unseen object only used for spacing)
cone
cone baseradius, height
FORMS
=====
these take an object (list of objects) and create another object from
a compound of these to which have been applied transformations
STACK number_to_stack
STACK number_to_stack IN space_of_number
STACK number_to_stack IN space_percentage "%"
This stacks number_to_stack objects with compression of:
1.0
space_of_number / number_to_stack
space_percentage / 100
The resulting object is similar to that created by a list of objects
i.e. sphere stack 2 is the same as sphere , sphere
FAN number , angle [ , tightness]
takes no_objs copies of object and fans them through 0 .. angle
degrees in a sphere (angle usually 0 .. 180), optional tightness
defaults to 1 gives a bunching effect, 0.1 shows what it does the
result is a single object of height 0;
web number1 WITH defined_object
[SCALE(number2)] number3 [hole number] [excess number]
uses number1 spokes of object webbed with number3 of defined object
which are optionally scaled up by number2.!
hole is the gap to leave in the middle (2 = 2 * length of a spoke)
excess is amount to exceed by (proportions of a spoke)
eg.
spokeobject WEB 8 WITH webbing_object 3
creates a sort of 8 spoked 3 ringed waggon-wheel.
rib NYI
MODIFIERS
=========
these are applied to an object and are used to change the shape
SIMPLE MODIFIERS
----------------
DELETE delete_range e.g delete 1 or delete 10 .. 5
makes the x..y'th object in the list invisible.
MOVE <vector>
moves every object in the list by vector (remember Y is up)
TEXTURE <texture name> eg texture "Metal pigment{White}"
applies the POV texture from that point downwards.
STACK MODIFIERS
---------------
these give a warning if they do not follow a stack but will often
work if there is a list of more than one object
GROW size
takes the stack and uniformly grows each object (about it's own
center) by an amount: 1 for the first object, and size for the
last.
POWERED_GROW
CENTERED_GROW
POWERED_CENTERED_GROW
slightly different in how they actually do the growing.
Not too hot. Powered grow is the best of the lot, it isn't
linear, that's all.
BEND angle
bends the stack fromthe vertical by angle. Bend of 360 gives one
loop of a spiral, bend of 90 gives a quarter loop.
TWIST angle [ , displacement]
rotates each obj in stack around vertical axis by 0 .. angle
degrees optional offset moves stack by displcement, rotates about
original axis and then moves back. Gives a spiral effect
TWISTX angle
rotates each obj in stack around X axis by 0 .. angle.
TWISTZ angle
rotates each obj in stack around vertical axis by 0 .. angle.
interesting effect when combined with BEND.
incremental twist ILLEGAL
incremental grow ILLEGAL
incremental bend ILLEGAL
OTHER VALID INPUT
=================
exists test token
end marks EndOfFile, REQUIRED or you don't get any output!
include "filename"
rummy@snaffle.demon.co.uk
Andrew Rowbottom